/**
 * author      : dormi330
 * date        : 2018/6/24
 * project     : mybatis
 * description : sku和数量
 */

package com.deep.trade.order;

import com.deep.trade.BaseDto;

import java.util.ArrayList;
import java.util.List;

public class InDtoPaymentCalculate extends BaseDto {

    private String tenantCode;                      // 租户code
    private String token;                        // 会员id
    private List<SkuAndQty> skuAndQtyList;          // sku-qty 列表

    public InDtoPaymentCalculate() {
    }

    public InDtoPaymentCalculate(String tenantCode, String token) {
        this.tenantCode = tenantCode;
        this.token = token;
        this.skuAndQtyList = new ArrayList<SkuAndQty>();
    }

    public InDtoPaymentCalculate addSkuAndQty(String skuId, int qty) {
        skuAndQtyList.add(new SkuAndQty(skuId, qty));
        return this;
    }

    //  === setter / getter ===

    public String getTenantCode() {
        return tenantCode;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public List<SkuAndQty> getSkuAndQtyList() {
        return skuAndQtyList;
    }

    public void setSkuAndQtyList(List<SkuAndQty> skuAndQtyList) {
        this.skuAndQtyList = skuAndQtyList;
    }

    public void setTenantCode(String tenantCode) {
        this.tenantCode = tenantCode;
    }

}